<h2 class="contentTitle" style="margin-bottom:0px;">添加文章</h2>
<div class="page">
  <div class="pageContent" layouth="31">
    <form method="post" action="<?php echo Yii::app()->request->requestUri?>" class="pageForm required-validate" onsubmit="return iframeCallback(this, navTabAjaxDone)" enctype="multipart/form-data">
      <div class="mypageFormContent" style="clear:both;margin-left:24px;padding:8px 0px;">
        <input type="hidden" name="navTabId" value="article_add" />
        <table>
          <tr>
            <th style="width:120px;">文章分类：</th>
            <td style="padding:8px;">
            <select name="category_id">
            <?php foreach ($category as $row):?>
            <option value="<?php echo $row->id?>"<?php if($row->id == $link->category_id){echo ' selected="selected"';}?>><?php echo $row->name?></option>
            <?php endforeach;?>
            </select>
            </td>
          </tr>
          <tr>
            <th style="width:80px;">链接名称：</th>
            <td style="padding:8px;"><input type="text" name="title" size="30" class="required textInput" value="<?php echo $link->title?>" /></td>
          </tr>
		  <tr>
            <th style="width:80px;">描述：</th>
            <td style="padding:8px;"><textarea name="description" cols="30" class="required textInput"><?php echo $link->description?></textarea></td>
          </tr>
          <tr>
            <th style="width:80px;">链接地址：</th>
            <td style="padding:8px;"><input type="text" name="url" size="30" class="required textInput" value="<?php echo $link->url?>" /></td>
          </tr>
          <tr>
            <th style="width:80px;">图片：</th>
            <td style="padding:8px;"><input type="file" name="photo" size="30" /><font color="red">*留空表示不做修改。</font></td>
          </tr>
          <tr>
            <th style="width:80px;">新窗口打开链接：</th>
            <td style="padding:8px;"><input type="checkbox" value="1" name="new_window"<?php if($link->new_window){echo ' checked="checked"';}?> /></td>
          </tr>
		  <tr>
            <th style="width:80px;">图片地址：</th>
            <td style="padding:8px;"><input type="text" name="photourl" size="80" class="textInput" value="<?php echo $link->photo?>" /><font color="red">*默认是原来的图片地址，要修改请以http://开头</font></td>
          </tr>
          <tr>
            <th style="width:80px;"></th>
            <td><div class="buttonActive"><div class="buttonContent"><button type="submit">&nbsp;&nbsp;提交&nbsp;&nbsp;</button></div></div></td>
          </tr>
        </table>
      </div>
    </form>
  </div>
</div>